package com.qianyu.api.controller.front;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qianyu.core.entity.base.Result;
import com.qianyu.core.entity.bean.MoneyWater;
import com.qianyu.core.entity.dto.MoneyWaterDto;
import com.qianyu.core.service.MoneyWaterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "前台管理-钱包流水", description = "wangzhicheng")
@RestController
@RequestMapping("/front/moneyWater")
@RequiredArgsConstructor
public class MoneyWaterController {

    private final MoneyWaterService moneyWaterService;
    /**
     * 查询钱包流水
     * @param dto
     * @return
     */
    @PostMapping("/pageList")
    @ApiOperation("查询钱包流水")
    Result<Page<MoneyWater>> pageList(@RequestBody @Validated MoneyWaterDto.MoneyWaterPageDto dto){
        return Result.success(moneyWaterService.pageList(dto));
    }
}
